Skip to content

Improve resultSelector documentation for Data Source Bindings#1348

Open
v-schhabra wants to merge 5 commits intomasterfrom
users/v-schhabra/improve-resultSelector-docs
Open

Improve resultSelector documentation for Data Source Bindings#1348
v-schhabra wants to merge 5 commits intomasterfrom
users/v-schhabra/improve-resultSelector-docs

Conversation

@v-schhabra
Copy link
Copy Markdown
Contributor

@v-schhabra v-schhabra commented Apr 2, 2026

Improves the resultSelector documentation for Data Source Bindings.

Resolves AB#2019941

Description:

  • Added a structured resultSelector reference section describing the supported selector formats for dynamic data sources.
  • Documented the supported resultSelector prefixes: jsonpath:, xpath:, none, and plaintext, along with their intended response handling behavior.
  • Expanded the JSONPath documentation with commonly used expression patterns, selector syntax, and representative examples for extracting values from JSON payloads.
  • Expanded the XPath documentation with usage guidance and examples for selecting values from XML responses.
  • Added documentation for known constraints and operational considerations, including cases where key names cannot be directly extracted and the 2 MB response size limit.

Documentation changes required: (Y/N) Yes

Added unit tests: (Y/N) N

Attached related issue: (Y/N) Y

Checklist:

  • Version was bumped - please check that version of the extension, task or library has been bumped.
  • Checked that applied changes work as expected.

Added detailed reference section for resultSelector including:
- Table of all supported selector types (jsonpath, xpath, none, plaintext)
- JSONPath implementation details (Newtonsoft.Json JToken.SelectTokens)
- Supported JSONPath operators with examples
- XPath implementation details (.NET System.Xml.XPath, XPath 1.0)
- Note about automatic namespace removal for XPath
- Response size limit documentation

Resolves AB#2019941

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@v-schhabra v-schhabra requested review from a team as code owners April 2, 2026 14:07
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines:
Successfully started running 1 pipeline(s).

```

**Notes :**
- Keep JSONPath expressions simple and easy to understand.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vague notes section — These three bullet points under JSONPath Notes are low-signal:

Maybe we should do it more like this:

"The implementation uses Newtonsoft.Json JToken.SelectTokens, which supports most standard JSONPath operators but not script expressions ([?(@.length-1)])."
"If a query returns no results, verify the response structure by using jsonpath:$ to see the full response."

|--------|-------------|
| `jsonpath:` | Used to extract data from JSON responses |
| `xpath:` | Used to extract data from XML responses |
| `none` | Returns no data |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with "Returns no data from the response"

```
"resultSelector": "none"
```
Use when you don't need any data from the response (e.g., for write-only REST calls).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of write-only rest calls - maybe would be better ""(e.g., for POST/PUT calls where only the status code matters)."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants